package lianxi5.正则表达式;

public class test4 {
    public static void main(String[] args) {

    }

    public  static boolean isUsername(String username) {
        boolean a = username.matches("\\w{4,16}");
        return a;
    }

    public static boolean isIdCard(String idCard) {
        boolean b = idCard.matches("[1-9]\\d{16}(\\d[X]x)");
        return b;
    }
}
